import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
    return request({
        url: `common/v1/adminDict`,
        params
    })
}

//中台 积分兑换配置列表
export function exchangeList(params) {   
    return request({
        url: `/integral/exchange/config/v1/list`,
        method: 'get',
        params
    })
}
//确认提交
export function commitExchange(data) {
    return request({
      url: '/integral/exchange/config/v1/commit',
      method: 'post',
      data
    })
}
//新增草稿
export function addExchange(data) {
    return request({
      url: '/integral/exchange/config/v1',
      method: 'post',
      data
    })
}
//编辑草稿
export function editExchange(data) {
    return request({
      url: '/integral/exchange/config/v1',
      method: 'put',
      data
    })
}
//获取详情
export function exchangeDetail(id) {
    return request({
        url: `/integral/exchange/config/v1/getInfo/${id}`,
        method: 'get',
    })
}

// 停止兑换
export function stopExchange(id) {
    return request({
        url: `/integral/exchange/config/v1/stopExchange/${id}`,
        method: 'POST',
    })
}
//中台 积分兑换配置列表
export function recordList(params) {   
    return request({
        url: `/integral/exchange/config/v1/record/list`,
        method: 'get',
        params
    })
}
